package ChainOfResponbilityPattern;

/**
 * @author： pang-yun
 * @date： 2022-01-06 19:03
 * 功能目的 ：用于
 */

public class ViceSchoolMasterApprover extends Approver {


    public ViceSchoolMasterApprover(String name) {
        super(name);
    }

    @Override
    public void processRequest(PurchaseRequest purchaseRequest) {
        if (purchaseRequest.getPrice() <= 30000) {
            System.out.println("编号为:" + purchaseRequest.getId() + "的请求已经被" + this.getName() + "处理");
        }else {
            //如果不能处理，则交给下一个审批人！
            getApprover().processRequest(purchaseRequest);
        }
    }
}
